<template>
  <!-- 容器 -->
  <div class="charts" ref="charts"></div>
</template>

<script>
// 引入echarts
import * as echarts from 'echarts'
import { mapState } from 'vuex'
export default {
  name: '',
  mounted() {
    // 初始化echarts实例
    let barChart = echarts.init(this.$refs.charts)
    // 配置数据
    barChart.setOption({
      xAxis: {
        show: false,
        type: 'category',
      },
      yAxis: {
        show: false,
      },
      // 系列
      series: [
        {
          type: 'bar',
          // data: this.listState.payTrend,
          data: [10, 7, 33, 12, 48, 9,29,10,44,33,22,8],
        },
      ],
      // 布局测试
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
      // 提示信息
      tooltip: {},
    })
  },
  computed: {
    ...mapState({
      listState: (state) => state.home.list,
    }),

  },
}
</script>

<style>
.charts {
  width: 100%;
  height: 100%;
}
</style>